﻿@model VasilekCerozhka.Models.ProductAPI.Category.CreateCategoryDtoBase

<br />

<form asp-action="CategoryCreate" class="container form-glass">
    <br />
    <div class="container p-3">
        <h1 class="text-primary">Создать продукт</h1>

        <hr />
        <div class="row mx-auto">


            <div class="col-9 px-5">

                <div asp-validation-summary="ModelOnly" class="text-danger"></div>

                <br />
                <br />

                <div class="form_input_custom">
                    <input asp-for="CategoryName" required autocomplete="off"/>

                    <label asp-for="CategoryName" for="name" class="label_name_input">
                        <span class="content_name_input">Наименование</span>
                    </label>
                    <span asp-validation-for="CategoryName" class="text-danger"></span>
                </div>


                <div class="form_input_custom">
                    <input asp-for="ImageUrl" required autocomplete="off" oninput="newimgproduct(this)" />

                    <label asp-for="ImageUrl" for="name" class="label_name_input">
                        <span class="content_name_input">Url Изображения</span>
                    </label>
                
                </div>

                <div class="col-12 pt-4">

                    <label id="id_label_textarea" class="label_textarea">Описание</label>

                    <div id="borderId" style="width: 100%;">
                        <textarea asp-for="Description" id="id_textarea" class="textarea_custom" onblur="TextareaEmpty()" onclick="TextareaChangesStyle()"></textarea>
                    </div>
                    <span id="id_span_label" class="span_label_textarea"></span>

                    <span asp-validation-for="Description" class="text-danger"></span>
                </div>

              
                @*<div class="col-12 pt-4">

                    <label id="id_label_textarea" class="label_textarea">Описание</label>
                    <div class="border_textarea_custom">
                        <textarea asp-for="Description" id="id_textarea" class="textarea_custom" rows="5" onblur="TextareaEmpty()" onclick="TextareaChangesStyle()"></textarea>
                    </div>

                    <span asp-validation-for="Description" class="text-danger"></span>
                </div>*@

                <div class="row p-3 pt-5">

                    <div class="col-6">

                        <div class="container_btn_custom">
                            <a asp-action="CategoryIndex" class="btn_custom a_custom">Вернуться</a>
                        </div>

                    </div>
                    <div class="col-6">
                        <div class="container_btn_custom">
                            <button type="submit" class="btn_custom a_custom">Добавить</button>
                        </div>
                    </div>

                </div>

            </div>

            <div class="col-3">

                <div id="new_product">
                </div>

            </div>

        </div>
    </div>
</form>

@section Scripts {
    <partial name="_ValidationScriptsPartial" />
}